<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    38. Count and Say
   </h1>
   <p>
    The count-and-say sequence is the sequence of integers with the first five terms as following:
   </p>
   <pre>
1.     1
2.     11
3.     21
4.     1211
5.     111221
</pre>
   <p>
    <code>
     1
    </code>
    is read off as
    <code>
     "one 1"
    </code>
    or
    <code>
     11
    </code>
    .
    <br>
    <code>
     11
    </code>
    is read off as
    <code>
     "two 1s"
    </code>
    or
    <code>
     21
    </code>
    .
    <br>
    <code>
     21
    </code>
    is read off as
    <code>
     "one 2
    </code>
    , then
    <code>
     one 1"
    </code>
    or
    <code>
     1211
    </code>
    .
   </p>
   <p>
    Given an integer
    <i>
     n
    </i>
    &nbsp;where 1 &le;
    <em>
     n
    </em>
    &le; 30, generate the
    <i>
     n
    </i>
    <sup>
     th
    </sup>
    term of the count-and-say sequence.
   </p>
   <p>
    Note: Each term of the sequence of integers will be represented as a string.
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <b>
     Example 1:
    </b>
   </p>
   <pre>
<b>Input:</b> 1
<b>Output:</b> "1"
</pre>
   <p>
    <b>
     Example 2:
    </b>
   </p>
   <pre>
<b>Input:</b> 4
<b>Output:</b> "1211"</pre>
  </div>
  <div>
   <h1 class="question_title">
    38. 报数
   </h1>
   <p>
    报数序列是一个整数序列，按照其中的整数的顺序进行报数，得到下一个数。其前五项如下：
   </p>
   <pre>1.     1
2.     11
3.     21
4.     1211
5.     111221
</pre>
   <p>
    <code>
     1
    </code>
    &nbsp;被读作&nbsp;&nbsp;
    <code>
     "one 1"
    </code>
    &nbsp;&nbsp;(
    <code>
     "一个一"
    </code>
    ) , 即&nbsp;
    <code>
     11
    </code>
    。
    <br>
    <code>
     11
    </code>
    被读作&nbsp;
    <code>
     "two 1s"
    </code>
    &nbsp;(
    <code>
     "两个一"
    </code>
    ）, 即&nbsp;
    <code>
     21
    </code>
    。
    <br>
    <code>
     21
    </code>
    被读作&nbsp;
    <code>
     "one 2"
    </code>
    , &nbsp;"
    <code>
     one 1"
    </code>
    &nbsp;（
    <code>
     "一个二"
    </code>
    &nbsp;,&nbsp;&nbsp;
    <code>
     "一个一"
    </code>
    )&nbsp;, 即&nbsp;
    <code>
     1211
    </code>
    。
   </p>
   <p>
    给定一个正整数
    <em>
     n
    </em>
    （1 &le;&nbsp;
    <em>
     n
    </em>
    &nbsp;&le; 30），输出报数序列的第
    <em>
     n
    </em>
    项。
   </p>
   <p>
    注意：整数顺序将表示为一个字符串。
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例&nbsp;1:
    </strong>
   </p>
   <pre><strong>输入:</strong> 1
<strong>输出:</strong> "1"
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入:</strong> 4
<strong>输出:</strong> "1211"
</pre>
  </div>
 </body>
</html>